package twenty;

/**
 * @author zzb
 * @since 2021-01-14
 */
public class Test {
  public static void main(String[] args) {
    Context ctx1 = new Context();
    ctx1.setWeather(new Sunshine());
    System.out.println(ctx1.weatherMessage());//阳光
    System.out.println("===============");
    Context ctx2 = new Context();
    ctx2.setWeather(new Rain());
    System.out.println(ctx2.weatherMessage());//下雨
  }
}
